﻿//-----------------------------------------------------------------------------------------
// <copyright file="Comment.cs" company="Jakub Florczyk (www.jakubflorczyk.pl)">
//      Copyright © 2009 Jakub Florczyk (www.jakubflorczyk.pl)
//      http://flakernet.codeplex.com
// </copyright>
//-----------------------------------------------------------------------------------------

namespace FlakerNET
{
    using System;
    using FlakerNET.Converters;
    using Newtonsoft.Json;

    /// <summary>
    /// Definicja komentarza.
    /// </summary>
    public class Comment
    {
        /// <summary>
        /// Treść komentarza.
        /// </summary>
        [JsonProperty("text")]
        public string Text { get; set; }

        /// <summary>
        /// Data utworzenia.
        /// </summary>
        [JsonProperty("datetime")]
        public DateTime DateTime { get; set; }

        /// <summary>
        /// Timestamp.
        /// </summary>
        [JsonProperty("timestamp")]
        [JsonConverter(typeof(Int32Converter))]
        public int Timestamp { get; set; }

        /// <summary>
        /// Adres komentarza.
        /// </summary>
        [JsonProperty("permalink")]
        [JsonConverter(typeof(UriConverter))]
        public Uri Permalink { get; set; }

        /// <summary>
        /// Autor komentarza.
        /// </summary>
        [JsonProperty("user")]
        public User User { get; set; }
    }
}
